home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Freeware / PerfectPaint / rexx / text / Stamp2.rx < prev    next >
Encoding:
Text File  |  2002-03-13  |  1.3 KB  |  95 lines

  1. /*
  2.     Arexx Text Script
  3. */
  4.  
  5.     options results
  6.  
  7.     parse ARG Port x y b
  8.     
  9.     ADDRESS value Port
  10.  
  11.     pp_GetDepth
  12.     depth=result
  13.     IF depth<24 then DO    
  14.         pp_Warn 'Only*for*24Bits.'
  15.         EXIT
  16.     END
  17.  
  18.     ADDRESS value Port
  19.  
  20.     pp_GetWidthT
  21.     w=result
  22.     pp_GetHeightT
  23.     h=result
  24.     pp_GetApen
  25.     Clr=result
  26.     pp_ClosestColor 255 255 255
  27.     White=result
  28.     pp_ClosestColor 0 0 0
  29.     Black=result
  30.  
  31.     pp_Psave "ram:palette"
  32.     pp_GetCurrentBuffer
  33.     CBf=result
  34.  
  35.     pp_FindEmptyBuffer
  36.     Bf=result
  37.     if Bf=-1 then DO
  38.         pp_Warn "can't*find*empty|Buffer."
  39.         EXIT        
  40.     END
  41.  
  42.     pp_UpdateUndoBox x-w/2-2 y-h/2-2 x+w/2+2 y+h/2+2
  43.  
  44.     pp_SetBuffer Bf
  45.  
  46.     pp_New w+20 h+20 24
  47.  
  48.     pp_Pload "ram:palette"
  49.     ADDRESS COMMAND
  50.     'delete >nil: ram:palette'
  51.     ADDRESS value Port    
  52.  
  53.     pp_ComposeReqOff
  54.     PP_Compose 0 100 0
  55.  
  56.     pp_SetApen Clr
  57.     pp_BoxF 0 0 w+19 h+19    
  58.     pp_EffectOff
  59.  
  60.     pp_SpareOnOff
  61.     pp_SetApen Black
  62.     pp_SetBpen White
  63.     pp_Cls
  64.     pp_TextDraw W/2+10 h/2+10
  65.  
  66.     pp_EffectOn
  67.     pp_Compose 0 100 0
  68.     pp_Displace 5
  69.     pp_Boxf 0 0 w+19 h+19
  70.  
  71.     PP_setApen White
  72.     pp_EffectOff
  73.     pp_Boxf 0 0 w+19 5
  74.     pp_Boxf 0 0 5 h+19
  75.     pp_Boxf w+14 0 w+19 h+19
  76.     pp_Boxf 0 h+14 w+19 h+19
  77.     
  78.     pp_SetApen Black
  79.     pp_EffectOn
  80.  
  81.     pp_GaussianBlur 20
  82.     pp_Boxf 0 0 w+19 h+19
  83.     pp_AdjustLevels 111 162
  84.     pp_EffectOff
  85.     pp_SparetoStencil
  86.     pp_StencilOn
  87.     pp_SpareOnOff
  88.     pp_SetBuffer CBf
  89.     pp_ComposeBuffer x y 100 Bf
  90.     pp_ClearBuffer Bf
  91.     pp_ComposeReqOn
  92.  
  93. exit
  94.  
  95.